package cn.masterj.springcloud.service;

import cn.masterj.springcloud.CommonResult;
import cn.masterj.springcloud.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author masterJ
 * @create 2020-04-10 19:46
 */
@Service
@FeignClient(value = "CLOUD-PROVIDER-PAYMENT")
public interface IPaymentService {

    @GetMapping("/payment/getById/{id}")
    CommonResult getById(@PathVariable("id") Long id);

    @PostMapping("/payment/create")
    CommonResult create(@RequestBody Payment payment);

}
